From e8da5ec916588e3f02ccafab1a5afc6b669c69ed Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 12 Apr 2014 22:13:14 -0700 Subject: [PATCH] widget-factory: Clean up on shutdown --- demos/widget-factory/widget-factory.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/demos/widget-factory/widget-factory.c b/demos/widget-factory/widget-factory.c index 21ff514268..937dc63e88 100644 --- a/demos/widget-factory/widget-factory.c +++ b/demos/widget-factory/widget-factory.c @@ -287,8 +287,7 @@ main (int argc, char *argv[]) { "about", activate_about, NULL, NULL, NULL }, { "quit", activate_quit, NULL, NULL, NULL }, }; - - gtk_init (&argc, &argv); + gint status; app = gtk_application_new ("org.gtk.WidgetFactory", 0); @@ -299,7 +298,8 @@ main (int argc, char *argv[]) g_signal_connect (app, "startup", G_CALLBACK (startup), NULL); g_signal_connect (app, "activate", G_CALLBACK (activate), NULL); - g_application_run (G_APPLICATION (app), argc, argv); + status = g_application_run (G_APPLICATION (app), argc, argv); + g_object_unref (app); - return 0; + return status; } -- 2.30.2